package com.fw4j.jdbc.datasource.entity;

public class Configure {
	
	private String database = "default";
	private String url = null;
	private String user = null;
	private String pwd = null;
	private String driver = null;
	private boolean pool = false; 
	private long outOfData = -1;
	private int MIN = 5;
	private int MAX = 30;
	private int watchTime = 60000;
	
	/**
	 * 
	 * @param url
	 * @param user
	 * @param pwd
	 * @param driver
	 * @param pool
	 */
	public Configure(String url, String user, String pwd, String driver,
			boolean pool) {
		this.url = url;
		this.user = user;
		this.pwd = pwd;
		this.driver = driver;
		this.setPool(pool);
	}
	/**
	 * 
	 * @param url
	 * @param user
	 * @param pwd
	 * @param driver
	 */
	public Configure(String url, String user, String pwd, String driver) {
		this(url,user,pwd,driver,false);
	}
	
	public String getDatabase() {
		return database;
	}
	public void setDatabase(String database) {
		this.database = database;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public String getPwd() {
		return pwd;
	}
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	public String getDriver() {
		return driver;
	}
	public void setDriver(String driver) {
		this.driver = driver;
	}
	public long getOutOfData() {
		return outOfData;
	}
	public void setOutOfData(long outOfData) {
		this.outOfData = outOfData;
	}
	public boolean isPool() {
		return pool;
	}
	public void setPool(boolean pool) {
		this.pool = pool;
	}
	public int getMIN() {
		return MIN;
	}
	public void setMIN(int mIN) {
		MIN = mIN;
	}
	public int getMAX() {
		return MAX;
	}
	public void setMAX(int mAX) {
		MAX = mAX;
	}
	public int getWatchTime() {
		return watchTime;
	}
	public void setWatchTime(int watchTime) {
		this.watchTime = watchTime;
	}

}
